import java.util.Random;


public abstract class Function {
	abstract complex function(int i);

	float eucNorm(int sizeOfGroup){
		complex temp;
		float sum=0;
		Random rand=new Random();
		int num=10;
		for(int i=0; i<Math.min(sizeOfGroup, num); i++){
			temp=function(rand.nextInt(sizeOfGroup));
			sum+=temp.norm()*temp.norm();
		}
		return (sum/Math.min(sizeOfGroup,num));
	}
}
